package org.yaac.server.egql.evaluator.aggregator;

import java.io.Serializable;
import java.math.BigDecimal;

import org.yaac.server.egql.evaluator.EvaluationResult;

/**
 * @author Max Zhu (thebbsky@gmail.com)
 *
 */
public interface Aggregator extends Serializable {

	/**
	 * @param delta
	 */
	void aggregate(EvaluationResult delta);

	/**
	 * @return
	 */
	String asString();

	/**
	 * @return result, can be Long for counter, or Double for others
	 */
	BigDecimal getResult();
}
